|
![](/i/fill.gif) |
Thorsten Froehlich wrote:
> In article <382DD8EA.259EDEF8@compuserve.com> , Chris Huff
> <Chr### [at] compuserve com> wrote:
>
> > I have been trying to compile a Mac version of UVPov, but the compile
> > crashes immediately on startup. The crash does not occur when I compile
> > for the POV.PPC-dbg target, but does happen for the POV.PPC target. I
> > have not tested any others.
>
> The problem is the too long version string macro POV_RAY_VERSION which is
> copied into just 16 bytes of memory in function CreateSplashScreen in
> SplashScreen.c. Just change the size of povVers to 32.
>
NO NONO NONONONONONONNO!!!!!!!!
aaaaaaaaaaaaaahhhhhhhhhhhhhh!!!!!!!!!!!!!!!!!!!
(sorry, but I sometimes panic at potentially dangerous code) :-)
Wouldn't it be safer to change it to something like
[taking a wild guess without having the mac sources around]
char povVers[ sizeof(POV_RAY_VERSION) + 1 ];
or
char *povVers = (char *)malloc( sizeof(POV_RAY_VERSION) + 1 );
?
--
"My new computer's got the clocks, it rocks
But it was obsolete before I opened the box" - W.A.Y.
Post a reply to this message
|
![](/i/fill.gif) |